package com.ygxsk.carhome.greendao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.ygxsk.carhome.greendao.CardTypeInfoBean;
import com.ygxsk.carhome.greendao.LoginInfo;
import com.ygxsk.carhome.response.CarBrandLargeCategory;
import com.ygxsk.carhome.response.CarBrandSeriesLineSmallCategory;

import com.ygxsk.carhome.greendao.CardTypeInfoBeanDao;
import com.ygxsk.carhome.greendao.LoginInfoDao;
import com.ygxsk.carhome.greendao.CarBrandLargeCategoryDao;
import com.ygxsk.carhome.greendao.CarBrandSeriesLineSmallCategoryDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig cardTypeInfoBeanDaoConfig;
    private final DaoConfig loginInfoDaoConfig;
    private final DaoConfig carBrandLargeCategoryDaoConfig;
    private final DaoConfig carBrandSeriesLineSmallCategoryDaoConfig;

    private final CardTypeInfoBeanDao cardTypeInfoBeanDao;
    private final LoginInfoDao loginInfoDao;
    private final CarBrandLargeCategoryDao carBrandLargeCategoryDao;
    private final CarBrandSeriesLineSmallCategoryDao carBrandSeriesLineSmallCategoryDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        cardTypeInfoBeanDaoConfig = daoConfigMap.get(CardTypeInfoBeanDao.class).clone();
        cardTypeInfoBeanDaoConfig.initIdentityScope(type);

        loginInfoDaoConfig = daoConfigMap.get(LoginInfoDao.class).clone();
        loginInfoDaoConfig.initIdentityScope(type);

        carBrandLargeCategoryDaoConfig = daoConfigMap.get(CarBrandLargeCategoryDao.class).clone();
        carBrandLargeCategoryDaoConfig.initIdentityScope(type);

        carBrandSeriesLineSmallCategoryDaoConfig = daoConfigMap.get(CarBrandSeriesLineSmallCategoryDao.class).clone();
        carBrandSeriesLineSmallCategoryDaoConfig.initIdentityScope(type);

        cardTypeInfoBeanDao = new CardTypeInfoBeanDao(cardTypeInfoBeanDaoConfig, this);
        loginInfoDao = new LoginInfoDao(loginInfoDaoConfig, this);
        carBrandLargeCategoryDao = new CarBrandLargeCategoryDao(carBrandLargeCategoryDaoConfig, this);
        carBrandSeriesLineSmallCategoryDao = new CarBrandSeriesLineSmallCategoryDao(carBrandSeriesLineSmallCategoryDaoConfig, this);

        registerDao(CardTypeInfoBean.class, cardTypeInfoBeanDao);
        registerDao(LoginInfo.class, loginInfoDao);
        registerDao(CarBrandLargeCategory.class, carBrandLargeCategoryDao);
        registerDao(CarBrandSeriesLineSmallCategory.class, carBrandSeriesLineSmallCategoryDao);
    }
    
    public void clear() {
        cardTypeInfoBeanDaoConfig.clearIdentityScope();
        loginInfoDaoConfig.clearIdentityScope();
        carBrandLargeCategoryDaoConfig.clearIdentityScope();
        carBrandSeriesLineSmallCategoryDaoConfig.clearIdentityScope();
    }

    public CardTypeInfoBeanDao getCardTypeInfoBeanDao() {
        return cardTypeInfoBeanDao;
    }

    public LoginInfoDao getLoginInfoDao() {
        return loginInfoDao;
    }

    public CarBrandLargeCategoryDao getCarBrandLargeCategoryDao() {
        return carBrandLargeCategoryDao;
    }

    public CarBrandSeriesLineSmallCategoryDao getCarBrandSeriesLineSmallCategoryDao() {
        return carBrandSeriesLineSmallCategoryDao;
    }

}
